<h2>DESCRIPTION</h2>

<em>v.hull</em> computes the convex hull of a vector map and outputs
the convex hull polygon as a vector area map. The convex hull, or
convex envelope, for an object or a set of objects is the minimal
convex set containing the given objects. This module creates a vector
polygon containing all vector points or lines of the input map.

<p>In the case of 3D input points, the hull will be a 3D hull as well,
unless the user specifies the <b>-f</b> flag. The 3D hull will be
composed of triangular faces.

<center>
<img src="v_hull.png" border="1"><br>
Fig: Convex hull polygon created with <em>v.hull</em>
</center>

<h2>NOTES</h2>

In order to use the <b>where</b> option the <b>layer</b> option must
be set to a positive number (the default is '-1' for 'all layers'), otherwise
all points from all layers will be used and the <b>cats</b> and <b>where</b>
options will be ignored.

<h2>EXAMPLE</h2>

Example of <em>v.hull</em> 3D output (using two random 3D point 
clouds, North Carolina sample data set):

<div class="code"><pre>
g.region rural_1m -p
r.mapcalc "zero = 0"
v.random -z output=random3d_a n=10 zmin=0 zmax=200
v.random -z output=random3d_b n=15 zmin=400 zmax=600
v.hull input=random3d_a output=random3d_a_hull
v.hull input=random3d_b output=random3d_b_hull

d.mon wx0
d.vect random3d_a_hull
d.vect random3d_a color=red

d.vect random3d_b_hull
d.vect random3d_b color=red

# 3D view in wxGUI (g.gui)
</pre></div>

<center>
<img src="v_hull_3d.png" border="1"><br>
Fig: Convex hull in 3D from 3D points created with <em>v.hull</em>
</center>


<h2>REFERENCES</h2>

<ul>
  <li>M. de Berg, M. van Kreveld, M. Overmars, O. Schwarzkopf,
    (2000). Computational geometry, chapter 1.1, 2-8.
  <li>J. O'Rourke, (1998). Computational Geometry in C (Second
  Edition), chapter 4.
</ul>

<h2>SEE ALSO</h2>

<em>
<a href="v.delaunay.html">v.delaunay</a>
</em>

<h2>AUTHOR</h2>

Andrea Aime, Modena, Italy<br>
Markus Neteler, ITC-irst (update to 5.7)<br>
Benjamin Ducke, CAU Kiel (3D hull support)<br>
Martin Landa, CTU in Prague, Czech Republic (vector lines support)

<!--
<p>
<i>Last changed: $Date$</i>
-->
